<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>综合咨询平台</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/admin/css/list.css" type="text/css"></link>

<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/common.js"></script>
<script type="text/javascript">
		function changeOrderId(id,value,url,reURL){
			$.ajax({
				type:'post',
				url:url,
				data:'navid='+id+'&&navorderid='+value,
				dataType:'json', 
				success:function(data,textStatus){
				 	var json = eval("(" + data + ")");
					alert(json.MSG);
					if(json.STATUS > 0){
						window.location.href=reURL;
					}
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					alert("操作失败!");
				}
			});
		}

   	</script>
</head>
<body>
<div id="inside_content">
	<div id="dynamic">导航管理</div>
	<div id="list_content">
		<div id="list_feature">
			<div class="op" onclick="to('<%=request.getContextPath() %>/<%=request.getContextPath() %>/menu!toAddMenu.action')" title="新增"><img src="<%=request.getContextPath() %>/resources/admin/images/001.png"/></div>
			<%-- <div class="op" onclick="deteleSelected('是否删除选中数据？','<%=request.getContextPath() %>/company!deteleSelectedCompany.action','<%=request.getContextPath() %>/company!searchCompany.action')" title="删除"><img src="<%=request.getContextPath() %>/resources/admin/images/083.png"/></div> --%>
		</div>
		<div id="hide_selet">条件</div>
	</div>
		<div id="show_content">
			<ul>
				<li id="nan">
					<ul>
						<li style="width: 8%;">编号</li>
						<li style="width: 10%;">导航名称</li>
						<li style="width: 8%;">链接</li>
						<li style="width: 10%;">标题</li>
						<li style="width: 10%;">关键字</li>
						<li style="width: 10%;">上级菜单</li>
						<li style="width: 10%;">是否启用</li>
						<li style="width: 10%;">排序</li>
						<li>详情</li>
						<li>编辑</li>
						<li>删除</li>
					</ul>
				</li>
				<c:forEach  var="menu" items="${request.resultMap.menu}"  varStatus="xh">
					<li id="<c:if test='${xh.count%2==0 }'>nan_im_double</c:if><c:if test='${xh.count%2!=0 }'>nan_im_single</c:if>"     >
						<ul>
							<li style="width: 8%;">${xh.count}</li>
							<li style="width: 10%;text-align: left;">${menu.navmenuname}</li>
							<li style="width: 8%;">${menu.navurl}</li>
							<li style="width: 10%;">${menu.navtitle}</li>
							<li style="width: 10%;">${menu.navkeywords}</li>
							<li style="width: 10%;">顶级菜单</li>
							<li style="width: 10%;">是否启用</li>
							<li style="width: 10%;">
								<input name="orderid"  type="text" class="list_input" value="${menu.navorderid}" onchange="changeOrderId(${menu.navid},this.value,'<%=request.getContextPath()%>/menu!changeOrderid.action','<%=request.getContextPath() %>/menu!findMenu.action');"/>
							</li>
							<li id="function_button" style="width: 8%;"   onclick="to('<%=request.getContextPath() %>/menu!toMenuDetails.action?navid=${menu.navid}')"><img src="<%=request.getContextPath() %>/resources/admin/images/details_logo.png"/></li>
							<li id="function_button" style="width: 8%;" onclick="to('<%=request.getContextPath() %>/menu!toUpdateMenu.action?navid=${menu.navid}')"><img src="<%=request.getContextPath() %>/resources/admin/images/editor_logo.png"/></li>
							<li id="function_button" style="width: 8%;" onclick="del('是否删除该条导航信息？','<%=request.getContextPath() %>/menu!delMenu.action?navid=${menu.navid}','<%=request.getContextPath() %>/menu!findMenu.action')"><img src="<%=request.getContextPath() %>/resources/admin/images/delete_logo.png"/></li>
						</ul>
					</li>
					<c:forEach  var="cmenu" items="${menu.clist}"  varStatus="cxh">
						<li id="<c:if test='${(cxh.count+xh.count)%2==0 }'>nan_im_double</c:if><c:if test='${(cxh.count+xh.count)%2!=0 }'>nan_im_single</c:if>"     >
							<ul>
								<li style="width: 8%;">${cxh.count}</li>
								<li style="width: 10%;text-align: left;"><label style="margin-left: 20px;">${cmenu.navmenuname}</label></li>
								<li style="width: 8%;">${cmenu.navurl}</li>
								<li style="width: 10%;">${cmenu.navtitle}</li>
								<li style="width: 10%;">${cmenu.navkeywords}</li>
								<li style="width: 10%;">${menu.navmenuname}</li>
								<li style="width: 10%;">是否启用</li>
								<li style="width: 10%;">
									<input name="orderid"  type="text" class="list_input" value="${cmenu.navorderid}" onchange="changeOrderId(${cmenu.navid},this.value,'<%=request.getContextPath()%>/menu!changeOrderid.action','<%=request.getContextPath() %>/menu!findMenu.action');"/>
								</li>
								<li id="function_button" style="width: 8%;"  onclick="to('<%=request.getContextPath() %>/menu!toMenuDetails.action?navid=${cmenu.navid}')"><img src="<%=request.getContextPath() %>/resources/admin/images/details_logo.png"/></li>
								<li id="function_button" style="width: 8%;" onclick="to('<%=request.getContextPath() %>/menu!toUpdateMenu.action?navid=${cmenu.navid}')"><img src="<%=request.getContextPath() %>/resources/admin/images/editor_logo.png"/></li>
								<li id="function_button" style="width: 8%;" onclick="del('是否删除该条导航信息？','<%=request.getContextPath() %>/menu!delMenu.action?navid=${cmenu.navid}','<%=request.getContextPath() %>/menu!findMenu.action')"><img src="<%=request.getContextPath() %>/resources/admin/images/delete_logo.png"/></li>
							</ul>
						</li>
					</c:forEach>	
				</c:forEach>
			</ul>
			 <div id="pageBar"></div> 
	</div>
</div>
</body>
</html>